package net.oschina.app.TestCase;

import android.widget.EditText;

import junit.framework.Assert;

import net.oschina.app.BaseCase;
import net.oschina.app.SoloWrap;

import static junit.framework.Assert.assertEquals;

/**
 * Created by kola on 2017/3/21.
 * 校验登录失败
 */

public class SecondCase extends BaseCase {

    public SecondCase() {

        super(false);
    }

    //        solo.clickOnView("net.oschina.app:id/nav_item_me");
//        Assert(solo.waitForText("动弹", 1, 5000, false));
    public void testFailLogin() throws Exception {
        helper.getPageCommon().goToMeFL();
        helper.getPageMyUnLogin().clickOnIcon();
        helper.getPageLogin().login("kola73", "skythebest111");
        Assert.assertTrue("用户名或口令错", true);

//        solo.clickOnView(solo.getView("net.oschina.app:id/nav_item_me"));
//        solo.waitForText("我的团队");
//        solo.clickOnView(solo.getView("net.oschina.app:id/iv_portrait"));
//        solo.waitForText("登陆", 1, 5000, false);
//        EditText name = (EditText) solo.getView("net.oschina.app:id/et_username");
//        solo.clearEditText(name);
//        solo.enterText(name, "ssss");
//        EditText pwd = (EditText) solo.getView("net.oschina.app:id/et_password");
//           solo.clearEditText(pwd);
//        solo.enterText(pwd, "11111");
//        solo.clickOnView(solo.getView("net.oschina.app:id/btn_login"));
//        Assert.assertTrue(solo.searchText("用户名或口令错", false));
    }


}
